let tbNews = document.getElementById('tbNews');
let selYm = document.getElementById('selYm');
let btnOk = document.getElementById('btnOk');

function queryxw() {
  tbNews.innerHTML = '';

  ajax.get(
    '/crud/news',
    {},
    (info) => {
      if (!info.success) {
        alert(info.message);
        return;
      }
      for (let i = 0; i < info.data.data.length; i++) {
        let pro = info.data.data[i];
        let tr = document.createElement('tr');
        tbNews.append(tr);
        //
        let td = document.createElement('td');
        td.append(pro.nid);
        tr.append(td);
        //
        td = document.createElement('td');
        td.append(pro.title);
        tr.append(td);
        //
        td = document.createElement('td');
        td.append(pro.info);
        tr.append(td);
      }
    }
  );
}

queryxw();

